package dao.pojo;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * Wxmember entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wxmember", catalog = "fw")
public class WxMember extends BasePojo implements java.io.Serializable {

	// Fields

	private Long userId;
	private User user;
	private String openId;
	private Boolean isAuth;
	private String nickName;
	private String headUrl;
	private String regTime;
	private Boolean blackBoy;

	@Override
	public Object getEntityId() {
		// TODO Auto-generated method stub
		return userId;
	}

	// Property accessors
	@Id
	@Column(name = "userId", unique = true, nullable = false)
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "openId", length = 512)
	public String getOpenId() {
		return this.openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	@Column(name = "isAuth")
	public Boolean getIsAuth() {
		return this.isAuth;
	}

	public void setIsAuth(Boolean isAuth) {
		this.isAuth = isAuth;
	}

	@Column(name = "blackBoy")
	public Boolean getBlackBoy() {
		return this.blackBoy;
	}

	public void setBlackBoy(Boolean blackBoy) {
		this.blackBoy = blackBoy;
	}
	
	@Column(name = "nickName", length = 50)
	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	@Column(name = "headUrl", length = 500)
	public String getHeadUrl() {
		return this.headUrl;
	}

	public void setHeadUrl(String headUrl) {
		this.headUrl = headUrl;
	}

	@Column(name = "regTime", length = 14)
	public String getRegTime() {
		return this.regTime;
	}

	public void setRegTime(String regTime) {
		this.regTime = regTime;
	}


}